Rules for Tools/struct Functions
struct Functions
Functions: Global data and library routines, so all Tools can share these.
struct Functions {
char lock; /* Do not touch this structure! */
char measureres; /* Cuts resolve to measures. */
char recording; /* Set when recording. */
char running; /* Set when running. */
char punchenabled; /* Auto punch in and out enabled. */
char loopenabled; /* Loop mode turned on. */
char clicking; /* Click track on? */
char seeclick; /* Visual metronome. */
char multiin; /* Multiple inputs? */
char clickchannel; /* MIDI CLick channel. */
char midiclock; /* Sync to MIDI clocks. */
char smpteclock; /* Sync to SMPTE. */
char sendmidiclock; /* Send out MIDI clocks. */
char smptetype; /* Which SMPTE format. */
char countdown; /* Do count down. */
char midiclick; /* Use MIDI for click track. */
char chop;
unsigned long countlen; /* Length of lead in. */
long timenow; /* Current time. */
unsigned long markone; /* Auto locate register. */
unsigned long marktwo; /* Auto locate register. */
unsigned long punchin; /* Punch in point. */
unsigned long punchout; /* Punch out point. */
unsigned long loopin; /* Loop in point. */
unsigned long loopout; /* Loop out point. */
unsigned long cutin; /* Cut in point. */
unsigned long cutout; /* Cut out point. */
long starttime; /* Where to play from. */
long stoptime; /* Marker to stop at. */
unsigned long padcutin; /* For non real time edits. */
unsigned long padcutout; /* For non real time edits. */
unsigned long songlength;
long startoffset; /* Starting hi res clock offset. */
unsigned short tempos[4];
unsigned short tempo; /* Current tempo. */
unsigned short inittempo; /* Initial tempo. */
char songname[100];
char author[100];
short palette[8]; /* Colors. */
char remotecontrol[128]; /* Table of remote controls. */
long more[20]; /* Expansion space. */
struct Track *tracklist; /* Top track in list. */
struct Clip masterclip; /* Master key, chord, signature. */
struct Clip masterundo;
struct Clip mastercut;
struct Edit *masteredit;
struct Tool *edittools[16];/* 16 Tools to edit with. */
unsigned short toolid; /* Global tool id. */
short groupid; /* Currently selected group. */
struct Chord *scalelist; /* All scales. */
struct Chord *chordlist; /* All chords. */
struct Rhythm *rhythmlist; /* All rhythms. */
long padd;
struct Event *lista; /* Leave this alone. */
long smptetime; /* Unused. */
unsigned long frame; /* Current frame. */
unsigned long hirestime; /* Hi res clock. */
char version;
long SysBase; /* Exec library. */
long DOSBase; /* DOS library. */
long IntuitionBase;
long GfxBase;
long LayersBase;
long standardout; /* Not used. */
long padb;
long padc;
struct Screen *screen; /* Screen we all exist in. */
struct Window *window; /* Main window. */
struct ToolMaster *toolmasterlist;/* All ToolMasters. */
struct Accessory *accesslist;/* All Accessories. */
struct Tool *midiouttool; /* Tool to send MIDI clocks. */
long (*stealmidi)(); /* Steal serial interrupt. */
long (*releasemidi)(); /* Release MIDI. */
long pad[100]; /* Room for more. */
long (*audioclick)(); /* Play click sound. */
struct Track *selectedtrack; /* Track currently selected. */
long flags; /* Additional flags. */
long pad[74]; /* Room for more. */
long (*installtransportp)(); /* Install prioritized transport handler. */
long (*fastgets)(); /* fgets() */
long (*fastseek)(); /* Fast seek file io. */
void (*adddisplayserver)();
void (*removedisplayserver)();
long (*dragtool)();
void (*addtoolserver)(); /* Server for dragging tools. */
void (*removetoolserver)();
long (*editsysex)(); /* Open sysex requester. */
struct Event *(*dupeevent)(); /* Duplicate an event. */
long (*frametotime)(); /* Convert frame to time. */
long (*timetoframe)(); /* Convert time to frame. */
long (*frametohmsf)(); /* Convert frame to hmsf. */
long (*hirestotime)(); /* Hires clock to time. */
long (*timetohires)(); /* Time to hires. */
long (*hirestoframe)(); /* Hires clock to frame. */
long (*frametohires)(); /* Frame to hires clock. */
long (*deletetool)(); /* Delete a tool. */
long (*createtool)(); /* Allocate a new tool. */
long (*sizetool)(); /* Returns size prior to save. */
long (*savetool)(); /* Save a Tool to disk. */
long (*loadtool)(); /* Load a Tool from disk. */
long (*gettoolmaster)(); /* Returns selected ToolMaster. */
long (*processsmpteclock)();/* Process a SMPTE event. */
long (*processmidiclock)(); /* Process a MIDI clock event .*/
long (*processsysex)();
long (*processinputevent)();
long (*clearenvironment)(); /* Clear the environment. */
long (*installenvironment)();/* Replace the environment. */
long (*loadsong)();
long (*savesong)();
long (*installtransport)(); /* Install transport handler. */
long (*removetransport)(); /* Remove transport handler. */
long (*transportcommand)(); /* Send command to handlers. */
long (*qevent)(); /* Put event in queue. */
long (*allocevent)(); /* Allocate an event. */
long (*fastallocevent)(); /* Allocate an event from interrupt. */
long (*freeevent)(); /* Free an event. */
long (*sorteventlist)(); /* Sort a list of events. */
long (*freelist)(); /* Free a list of events. */
long (*dupelist)(); /* Duplicate a list. */
long (*dupeevent)(); /* Duplicate a event. */
long (*allocstring)(); /* Allocate a string. */
long (*freestring)(); /* Free a string. */
long (*replacestring)(); /* Replace a string with another. */
long (*dupestring)(); /* Duplicate a string. */
long (*stringtext)(); /* Get string. */
long (*clearclip)(); /* Clear a clip. */
long (*dupeclip)(); /* Duplicate a clip. */
long (*cutclip)(); /* Clip cut operation. */
long (*copyclip)(); /* Clip copy operation. */
long (*pasteclip)(); /* Clip paste operation. */
long (*mixclip)(); /* Clip mix operation. */
long (*loadclip)(); /* Load a clip from disk. */
long (*saveclip)(); /* Save a clip. */
long (*clipboard)(); /* Clipboard operation. */
long (*createtrack)(); /* Create a track. */
long (*deletetrack)(); /* Delete a track. */
long (*myalloc)(); /* Internal allocation routine. */
long (*myfree)(); /* Internal free routine. */
long (*doscall)(); /* Make a DOS command. */
long (*fastopen)(); /* Fast file open. */
long (*fastwrite)(); /* Fast file write. */
long (*fastread)() /* Fast file read. */
long (*fastclose)(); /* Fast file close. */
long (*popupkey)();
long (*popupnote)();
long (*popupoctave)();
long (*popupchord)();
long (*popuprhythm)();
long (*popupscale)();
long (*measuretotime)();
long (*timetomeasure)();
long (*totalbeatstotime)();
long (*timetototalbeats)();
long (*lengthtostring)();
long (*stringtolength)();
long (*timetostring)();
long (*stringtotime)();
long (*frametotime)();
long frametostring();
long stringtoframe();
long notetostring();
long stringtonote();
long (*noteinkey)(); /* Check for note in key. */
long (*noteinchord)(); /* Check for note in chord. */
long (*noteinrhythm)(); /* Align note with rhythm. */
long (*timetokey)();
long (*timetochord)();
long (*timetodynamics)();
long (*nextrhythmbeat)();
long (*scaletotwelve)();
long (*twelvetoscale)();
long (*random)(); /* Return random number. */
long (*areyosure)(); /* Put up "are you sure?" requester. */
long (*openwait)(); /* Open wait requester. */
long (*closewait)(); /* Close wait requester. */
long (*display)(); /* Display main window. */
long (*ScrollingPopUpMenu)();
long (*DragSlider)();
long (*DrawSlider)();
/* Inovatools 1 routines. */
long (*Itoa)();
long (*Atoi)();
long (*RefreshGadget)();
long (*GetGadget)();
long (*GetStringInfo)();
long (*SetStringInfo)();
long (*GetStringInfoNumber)();
long (*SetStringInfoNumber)();
long (*GetPropInfo)();
long (*SetPropInfo)();
long (*GetSelectIntuiMessage)();
long (*GetIntuiMessage)();
long (*ClearIntuiMessages)();
long (*GetMenu)();
long (*GetMenuItem)();
long (*CheckMenuItem)();
long (*EnableMenuItem)();
long (*EnableMenu)();
long (*EnableGadget)();
long (*SelectGadget)();
long (*DupeNewWindow)();
long (*DeleteNewWindow)();
long (*DupeMenu)();
long (*DeleteMenu)();
long (*SendCloseWindow)();
long (*List_Len)();
long (*List_Position)();
long (*List_Pred)();
long (*List_Index)();
long (*List_Cat)();
long (*List_Insert)();
long (*List_Remove)();
long (*SetScrollBar)();
long (*DrawList)();
long (*ScrollList)();
long (*SizeList)();
long (*InitListInfo)();
long (*RemoveListInfo)();
long (*GetListItem)();
long (*ClickList)();
long (*InsertListItem)();
long (*RemoveListItem)();
long (*PopUpMenu)();
long (*DragGadget)();
long (*FileName)();
long (*FlashyOpenWindow)();
long (*FlashyCloseWindow)();
long (*WhichWindow)();
long (*DupeListInfo)();
long (*DeleteListInfo)();
long (*RealTimeScroll)();
/* Embossing Functions */
void (*EmbossOn)();
void (*EmbossOff)();
void (*DrawEmbossed)();
void (*EnableEmbossed)();
void (*SelectEmbossed)();
void (*ModifyEmbossedProp)();
long (*DragEmbossedProp)();
long (*DrawEmbossedProp)();
long (*ShiftEmbossedPropOnce)();
long (*ShiftEmbossedProp)();
long (*EmbossedPropOn)();
void (*FatEmbossedPropOn)();
void (*EmbossedPropOff)();
void (*FatEmbossedPropOff)();
void (*DrawEmbossedRect)();
void (*DrawEmbossedWindow)();
void (*EmbossWindowOff)();
void (*EmbossWindowOn)();
void (*EmbossRequestOn)();
void (*RefreshEmbossedWindowFrame)();
int (*SystemGadgets)();
void (*ModifyWindowProps)();
void (*EmbossedWindowTitle)();
void (*EmbossedWindowText)();
void (*setsmalltext)(struct Window *window,short id,char *name);
short (*fitsmalltext)(char *text,short length);
void (*usetopazfont)(struct RastPort *rp);
void (*usesmallfont)(struct RastPort *rp); };